package com.aaa.order.service.Impl;

import com.aaa.order.dao.OrderDao;
import com.aaa.order.service.IOrderService;
import com.alibaba.csp.sentinel.annotation.SentinelResource;
import entity.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderService implements IOrderService {

    @Autowired
    private OrderDao orderDao;

    @Override
    public int save(Order order) {
        return orderDao.insert(order);
    }

    @Override
    @SentinelResource("queryGood") //默认sentinel对controller的路径设置为资源 如果向对象别的层中的方法设置为资源需要添加该注解
    public void queryGood() {

    }
}
